import Vue from 'vue'
import Vuex from 'vuex'
import { getItem, setItem } from '@/utils/locattion.js'
Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    token:getItem('token')
  },
  mutations: {
    // 写一个方法把它变成本地缓存
    local(state,num){
      state.token = num
      setItem('token',num)
    }
  },
  actions: {
  },
  modules: {
  }
})
